1. Field of the Invention
The present invention relates to data transfer control techniques for ensuring security when performing data transfers between devices using a DMA (Direct Memory Access) controller in a secret information processing apparatus.
2. Related Art
A DMA controller performs data transfers between devices, instead of a CPU. The CPU requests the DMA controller to perform a data transfer of a heavy load. This enables the CPU to execute other tasks while the DMA controller is performing the data transfer.
The DMA controller performs a data transfer based on source and destination addresses given from the CPU. This being so, if noise or the like occurs in address signals, the DMA controller may fail to recognize correct addresses and transfer data to wrong addresses. As a result, important data stored in a device to which the data has been wrongly transferred may be lost or destroyed by overwriting.
To prevent such an incorrect data transfer by the DMA controller, the following technique is conventionally disclosed in Japanese Patent Application Publication No. 2001-297054.
In a secret information processing apparatus, a DMA controller reads data stored in a storage area of one address and transfers the read data to a storage area of another address, in accordance with address-related data stored in registers used for a data transfer between devices. This DMA controller includes a table which shows an effective address range assigned to each individual device, and a monitor unit which stops the data transfer when an address shown by address-related data stored in the registers deviates from the effective address range in the table.
According to this technique, when an error occurs in the address-related data due to noise or the like, the data transfer is stopped. This prevents failures such as reading data from an address to which a memory is not allocated, writing data to an address intended for another purpose, or transferring data of a completely different size.
In cases where the level of secrecy differs between devices, however, the above conventional technique has the following problem. Take a secret information processing apparatus in which only a specific CPU is authorized to access a device having a particularly high level of secrecy, for example. Even if a data transfer to or from this device is requested by a CPU other than the specific CPU, the DMA controller of the conventional technique performs the data transfer, so long as an address range assigned to the device is not deviated.